package com.ellfors.common.widget

import android.app.Dialog
import android.content.Context
import android.os.Bundle
import com.ellfors.common.R

class LoadingView(context: Context) : Dialog(context, R.style.transparent_dialog) {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.dialog_loading_view)
    }

    override fun show() {
        if (isShowing) {
            return
        }
        super.show()
    }

    override fun dismiss() {
        if (isShowing.not()) {
            return
        }
        super.dismiss()
    }

}